package cc.iotkit.data.model;

import cc.iotkit.model.device.DeviceDailyReport;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@Entity
@Table(name = "device_daily_report")
@ApiModel(value = "设备每天统计报告")
@AutoMapper(target = DeviceDailyReport.class)
@DynamicUpdate
@DynamicInsert
public class TbDeviceDailyReport {
    @Id
    @GeneratedValue(generator = "SnowflakeIdGenerator")
    @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
    @ApiModelProperty(value = "id")
    private Long id;

    private Date reportDate;

    private String deviceId;

    private Long onlineTimes;
    private Long workingTimes;

    private Float distance;

    private Integer chargeTimes;

    private Integer  dischargeTimes;

    private Integer  distributionTimes;

    private Float square;

    private Integer receiveTimes;

    private Integer askTimes;

    private Date dts;
}
